package game;

/**
 *	@(#)Worker.java
 *
 *	The <code>Worker</code> class represents a worker in a player's city.
 *	Workers are used to man buildings. Manning buildings activates them.
 *	Also, a worker is used on land to show possession of buildings.
 *
 *	@author Grzegorz Kobiela
 *	@version 1.0 2008/4/23
 */
public final class Worker
extends Marker
{
	/** True if this worker is out in the countryside. */
	private boolean onLand = false;

	/**
	 *	Creates a new <code>Worker</code> instance with the given color.
	 *	@param color the color
	 */
	public Worker(PlayerColor color) {
		super(color);
	}

	/**
	 *	Returns true if this worker is out in the countryside.
	 *	@return true if this worker is out in the countryside
	 */
	public boolean isOnLand() {
		return onLand;
	}

	/**
	 *	Sets whether this worker is out in the countryside or not.
	 *	@param onLand provide true if this worker is out in the countryside
	 */
	public void setOnLand(boolean onLand) {
		this.onLand = onLand;
	}
}